extends CharacterBody2D

var SPEED:int = 0
var target_pos:Vector2 = Vector2.ZERO

func _physics_process(delta: float) -> void:
	velocity =  target_pos * SPEED
	move_and_slide()



func _on_hit_area_body_entered(body: Node2D) -> void:
	if body.is_in_group("wall"):
		queue_free()
	if body.is_in_group("enemy"):
		body.hurt()
		queue_free()
	pass # Replace with function body.
